function InvitationQrCode(params){ 
	 
}

InvitationQrCode.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new InvitationQrCode.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new InvitationQrCode.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new InvitationQrCode.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	/** 编号 [非空]       **/
	this.id=function(id){if(this.proxy)return this.getProxy().id(id);  this.put("id", id);return this;};
	/** and id is null */
	this.idNull=function(){if(this.proxy)return this.getProxy().idNull();if(this.get("idNot")==null)this.put("idNot", "");this.put("id", null);return this;};
	/** not .... */
	this.idNot=function(){if(this.proxy)return this.getProxy().idNot();this.put("idNot", "not");return this;};
	this.idNotNull=function(){if(this.proxy)return this.getProxy().idNotNull();this.put("idNot", "not");this.put("id", null);return this;};
	this.idNot=function(id){if(this.proxy)return this.getProxy().idNot(id);this.put("idNot", "not");this.put("id", id);return this;};
	/** and id <= ? */
	this.idMin=function(min){if(this.proxy)return this.getProxy().idMin(min);this.put("idMin", min);return this;};
	/** and id >= ? */
	this.idMax=function(max){if(this.proxy)return this.getProxy().idMax(max);this.put("idMax", max);return this;};
	this.idIn=function(ids){
		if(this.proxy)return this.getProxy().idIn(ids);  this.put("idIn", ids);return this;
	};	
	
	/** 所属品牌  [Merchant]      **/
	this.brand=function(brand){if(this.proxy)return this.getProxy().brand(brand);  this.put("brand", brand);return this;};
	/** and brand is null */
	this.brandNull=function(){if(this.proxy)return this.getProxy().brandNull();if(this.get("brandNot")==null)this.put("brandNot", "");this.put("brand", null);return this;};
	/** not .... */
	this.brandNot=function(){if(this.proxy)return this.getProxy().brandNot();this.put("brandNot", "not");return this;};
	this.brandNotNull=function(){if(this.proxy)return this.getProxy().brandNotNull();this.put("brandNot", "not");this.put("brand", null);return this;};
	this.brandNot=function(brand){if(this.proxy)return this.getProxy().brandNot(brand);this.put("brandNot", "not");this.put("brand", brand);return this;};
	this.brandIn=function(ids){
		if(this.proxy)return this.getProxy().brandIn(ids);  this.put("brandIn", ids);return this;
	};	
	
	/** 所属会员  [Member]      **/
	this.member=function(member){if(this.proxy)return this.getProxy().member(member);  this.put("member", member);return this;};
	/** and member is null */
	this.memberNull=function(){if(this.proxy)return this.getProxy().memberNull();if(this.get("memberNot")==null)this.put("memberNot", "");this.put("member", null);return this;};
	/** not .... */
	this.memberNot=function(){if(this.proxy)return this.getProxy().memberNot();this.put("memberNot", "not");return this;};
	this.memberNotNull=function(){if(this.proxy)return this.getProxy().memberNotNull();this.put("memberNot", "not");this.put("member", null);return this;};
	this.memberNot=function(member){if(this.proxy)return this.getProxy().memberNot(member);this.put("memberNot", "not");this.put("member", member);return this;};
	this.memberIn=function(ids){
		if(this.proxy)return this.getProxy().memberIn(ids);  this.put("memberIn", ids);return this;
	};	
	
	/** 二维码        **/
	this.code=function(code){if(this.proxy)return this.getProxy().code(code);  this.put("code", code);return this;};
	/** and code is null */
	this.codeNull=function(){if(this.proxy)return this.getProxy().codeNull();if(this.get("codeNot")==null)this.put("codeNot", "");this.put("code", null);return this;};
	/** not .... */
	this.codeNot=function(){if(this.proxy)return this.getProxy().codeNot();this.put("codeNot", "not");return this;};
	this.codeNotNull=function(){if(this.proxy)return this.getProxy().codeNotNull();this.put("codeNot", "not");this.put("code", null);return this;};
	this.codeNot=function(code){if(this.proxy)return this.getProxy().codeNot(code);this.put("codeNot", "not");this.put("code", code);return this;};
	
	/** 类型    1:邀请二维码     **/
	this.type=function(type){if(this.proxy)return this.getProxy().type(type);  this.put("type", type);return this;};
	/** and type is null */
	this.typeNull=function(){if(this.proxy)return this.getProxy().typeNull();if(this.get("typeNot")==null)this.put("typeNot", "");this.put("type", null);return this;};
	/** not .... */
	this.typeNot=function(){if(this.proxy)return this.getProxy().typeNot();this.put("typeNot", "not");return this;};
	this.typeNotNull=function(){if(this.proxy)return this.getProxy().typeNotNull();this.put("typeNot", "not");this.put("type", null);return this;};
	this.typeNot=function(type){if(this.proxy)return this.getProxy().typeNot(type);this.put("typeNot", "not");this.put("type", type);return this;};
	/** and type <= ? */
	this.typeMin=function(min){if(this.proxy)return this.getProxy().typeMin(min);this.put("typeMin", min);return this;};
	/** and type >= ? */
	this.typeMax=function(max){if(this.proxy)return this.getProxy().typeMax(max);this.put("typeMax", max);return this;};
	this.typeIn=function(ids){
		if(this.proxy)return this.getProxy().typeIn(ids);  this.put("typeIn", ids);return this;
	};	
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有邀请二维码 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/users/invitationqrcode.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取邀请二维码分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/users/invitationqrcode.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取邀请二维码 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/users/invitationqrcode.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

InvitationQrCode.get = function(id){
	var protocol = ux.ajax("/admin/users/invitationqrcode.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.invitationQrCode;
	return null;
}

InvitationQrCode.where = new InvitationQrCode.Where(0,true);